<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>大事件-后台首页</title>
  <script>
    // 0. 在进入后台主页时，先判断 localStorage 中是否有 token
    //    如果没有 token，则证明用户没有登录，强制跳转到登录页面
    var tokenStr = localStorage.getItem('token')
    if (!tokenStr) {
      location.href = './login.html'
    }
  </script>
  <link rel="stylesheet" href="../assets/lib/layui/css/layui.css" />
  <link rel="stylesheet" href="../assets/fonts/iconfont.css" />
  <link rel="stylesheet" href="../assets/css/index.css" />
</head>

<body class="layui-layout-body">
  <div class="layui-layout layui-layout-admin">
    <div class="layui-header">
      <div class="layui-logo">
        <img src="../assets/images/logo.png" alt="" />
      </div>
      <!-- 头部区域（可配合layui已有的水平导航） -->
      <ul class="layui-nav layui-layout-right">
        <li class="layui-nav-item">
          <a href="javascript:;" id="header-avatar">
            <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
            个人中心
          </a>
          <dl class="layui-nav-child">
            <dd><a href="./user/user_info.html" target="main_frame">基本资料</a></dd>
            <dd><a href="./user/user_avatar.html" target="main_frame">更换头像</a></dd>
            <dd><a href="./user/user_resetpwd.html" target="main_frame">重置密码</a></dd>
          </dl>
        </li>
        <li class="layui-nav-item"><a href="javascript:;" id="btnLogout"><span
              class="iconfont icon-tuichu"></span>退出</a></li>
      </ul>
    </div>

    <div class="layui-side layui-bg-black">
      <div class="layui-side-scroll">
        <!-- 用户信息 -->
        <div class="user-info">
          <img src="http://t.cn/RCzsdCq" class="layui-nav-img" />
          <div class="welcome">
            <span>欢迎&nbsp;&nbsp;<span id="username">张三</span></span>
          </div>
        </div>
        <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
        <ul class="layui-nav layui-nav-tree" lay-shrink="all">
          <li class="layui-nav-item">
            <a href="./home/dashboard.html" target="main_frame">
              <span class="iconfont icon-home" id="firstNavItem"></span>首页
            </a>
          </li>
          <li class="layui-nav-item">
            <a class="" href="javascript:;"><span class="iconfont icon-16"></span>文章管理</a>
            <dl class="layui-nav-child">
              <dd>
                <a href="./article/art_category.html" target="main_frame">
                  <i class="layui-icon layui-icon-app"></i>文章类别
                </a>
              </dd>
              <dd>
                <a href="./article/art_list.html" target="main_frame"><i class="layui-icon layui-icon-app"></i> 文章列表</a>
              </dd>
              <dd>
                <a href="./article/art_publish.html" target="main_frame">
                  <i class="layui-icon layui-icon-app"></i> 发表文章
                </a>
              </dd>
            </dl>
          </li>
          <li class="layui-nav-item">
            <a href="javascript:;"><span class="iconfont icon-user"></span>个人中心</a>
            <dl class="layui-nav-child">
              <dd><a href="./user/user_info.html" target="main_frame"><i class="layui-icon layui-icon-app"></i> 基本资料</a>
              </dd>
              <dd><a href="./user/user_avatar.html" target="main_frame"><i class="layui-icon layui-icon-app"></i>
                  更换头像</a></dd>
              <dd><a href="./user/user_resetpwd.html" target="main_frame"><i class="layui-icon layui-icon-app"></i>
                  重置密码</a></dd>
            </dl>
          </li>
        </ul>
      </div>
    </div>

    <div class="layui-body">
      <!-- 内容主体区域 -->
      <!-- <div style="padding: 15px;">内容主体区域</div> -->
      <div style="padding: 0px;" id="container">
        <iframe src="" frameborder="0" name="main_frame" class="layadmin-iframe"></iframe>
      </div>
    </div>

    <div class="layui-footer">
      <!-- 底部固定区域 -->
      © www.itheima.com - 黑马程序员
    </div>
  </div>

  <script src="../assets/lib/layui/layui.all.js"></script>
  <script src="../assets/lib/jquery.js"></script>
  <script src="../assets/js/baseAPI.js"></script>
  <script src="../assets/js/index.js"></script>
</body>

</html>